The tutorial works with PIL, but Mac users can instead install Pillow, a maintained fork of PIL, using sudo pip install Pillow.
sudo pip install Pillow
Simply run python punctuation.py and open your generated image.
python punctuation.py